package ae.pcfc.cldos.online.common.delegate.provider;

import java.util.List;

import ae.pcfc.cldos.online.common.delegate.AdminTaskDelegate;
import ae.pcfc.cldos.online.common.delegate.BaseDelegate;
import ae.pcfc.cldos.online.common.facade.AdminTasksFacade;
import ae.pcfc.cldos.online.common.vo.AppMetaDataVO;
import ae.pcfc.cldos.online.common.vo.StatusVO;
import ae.pcfc.cldos.online.common.vo.UserVO;
import ae.pcfc.cldos.online.common.vo.notifications.NotificationRequestVO;
import ae.pcfc.cldos.online.common.vo.notifications.NotificationVO;
import ae.pcfc.cldos.online.common.vo.notifications.NotificationsVO;
import ae.pcfc.cldos.online.common.vo.tasks.TaskRequestVO;
import ae.pcfc.cldos.online.common.vo.tasks.TasksVO;

/**
 * 
 * @author arosa
 *
 */
public class AdminTaskDelegateImpl extends BaseDelegate implements AdminTaskDelegate {

	public TasksVO getAdminTaskList(TaskRequestVO taskRequestVO){
		return getServiceLocator().getFacadeService(AdminTasksFacade.class).getAdminTaskList(taskRequestVO);
	}
	
	public AppMetaDataVO getPlainAppMetaDataVO(String appId) throws Exception{
		return getServiceLocator().getFacadeService(AdminTasksFacade.class).getPlainAppMetaDataVO(appId);
	}

	
	public TasksVO getAllAppRequests(TaskRequestVO taskRequestVO){
		return getServiceLocator().getFacadeService(AdminTasksFacade.class).getAllAppRequests(taskRequestVO);
	}

	
	public NotificationsVO getUserNotifications(NotificationRequestVO notificationRequestVO){
		return getServiceLocator().getFacadeService(AdminTasksFacade.class).getUserNotifications(notificationRequestVO);
	}

	/* (non-Javadoc)
	 * @see ae.pcfc.cldos.online.common.delegate.AdminTaskDelegate#getNotificationDetail(java.lang.Long)
	 */
	public NotificationVO getNotificationDetail(Long msgId){
		return getServiceLocator().getFacadeService(AdminTasksFacade.class).getNotificationDetail(msgId);
	}

	/* (non-Javadoc)
	 * @see ae.pcfc.cldos.online.common.delegate.AdminTaskDelegate#findApplicationStatusByType(java.lang.String)
	 */
	public List<StatusVO> findApplicationStatusByType(String statusType){
		return getServiceLocator().getFacadeService(AdminTasksFacade.class).findApplicationStatusByType(statusType);
	}
	
	public Integer getNewNotificationsCount(UserVO userVO){
		return getServiceLocator().getFacadeService(AdminTasksFacade.class).getNewNotificationsCount(userVO);
	}
	
	public Integer getNewTasksCount(UserVO userVO){
		return getServiceLocator().getFacadeService(AdminTasksFacade.class).getNewTasksCount(userVO);
	}
	
	public void markNotificationAsReaded(String mesId, UserVO userVO){
		getServiceLocator().getFacadeService(AdminTasksFacade.class).markNotificationAsReaded(mesId, userVO);
	}
	
	public TasksVO getAllAppRequestsForTksAdmin(TaskRequestVO taskRequestVO,String tksId){
		return getServiceLocator().getFacadeService(AdminTasksFacade.class).getAllAppRequestsForTksAdmin(taskRequestVO, tksId);
	}
}
